<?php
declare (strict_types = 1);

namespace app\business;

use think\Exception;
use think\facade\Log;

class ProductSpecValue {

    protected $model;

    public function __construct() {

        $this->model = new \app\model\mysql\ProductSpecValue();
    }

    /**
     * 获取规格值列表
     *
     * @param string $field
     * @return array
     */
    public function getList($specId = 0, $field = "id, spec_id, name") : array {

        $specValues = [];
        try{
            $specValues = $this->model->getList($specId, $field);
        }catch (Exception $e){
            Log::error($e->getMessage());
        }

        return $specValues;
    }



}